package com.dartsstats;

public class Player {
	
	private long id;
	private String firstName;
	private String lastName;
	private long team;
	private String salutation = "";
	private String title = "";
	
	public Player(){
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public long getTeam() {
		return team;
	}

	public void setTeam(long team) {
		this.team = team;
	}

	public String getSalutation() {
		return salutation;
	}

	public void setSalutation(String salutation) {
		this.salutation = salutation;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}
	
	public String toString() {
		return firstName + " " + lastName;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(!(obj instanceof Player)){
			return false;
		}
		if(((Player)obj).getId() == getId()) {
			return true;
		}
		return false;
	}

}
